<%@ page import="PoJo.Person" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.Map" %>
<%@ page import="java.util.HashMap" %><%--
  Created by IntelliJ IDEA.
  User: Distance
  Date: 2021/10/18
  Time: 16:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
        <%
            Person person = new Person();
            person.setName("华哥好帅!");
            person.setPhones(new String[]{"1866666","12333333","1366666"});
            List<String> cities = new ArrayList<String>();
            cities.add("北京");
            cities.add("上海");
            cities.add("深圳");
            cities.add("东莞");
            person.setCities(cities);
            Map<String, Object> map = new HashMap<>();
            map.put("key1","value1");
            map.put("key2","value21");
            map.put("key3","value3");
            person.setMap(map);
            pageContext.setAttribute("person",person);
        %>
  输出Person Bean: ${person} <br>
  输出Person name: ${person.name}<br>
  输出Person Phones中的元素： ${person.phones[0]}<br>
  输出Person Phones中的元素： ${person.phones[1]}<br>
  输出Person Phones中的元素： ${person.phones[2]}<br>
  输出Citys集合中的元素值：${person.cities}<br>
  输出Citys集合中的元素值的某一个： ${person.cities[0]}<br>
  输出Map 集合中的元素值：${person.map}<br>
  输出Map 集合中的元素值的某一个：${person.map.key1}<br>
  输出Map 集合中的元素值的某一个：${person.map.key2}<br>
  输出Map 集合中的元素值的某一个：${person.map.key3}<br>
   ${person.age}<br>

   ${empty emptynull}
</body>
</html>
